﻿namespace NoMvvm.TinyIoC
{
    /// <summary>
    /// Holds extension methods for TinyIoC
    /// </summary>
    public static class Extensions
    {
        /// <summary>
        /// Sets up the NoMvvm Runtime class with TinyIoC
        /// </summary>
        /// <param name="runtime"></param>
        /// <param name="container"></param>
        /// <returns></returns>
        public static Runtime SetupTinyIoC(this Runtime runtime, TinyIoCContainer container)
        {
            return runtime.SetupContainer(new Adapter(container));
        }

        /// <summary>
        /// Sets up the NoMvvm Runtime class with TinyIoC
        /// </summary>
        /// <param name="runtime"></param>
        /// <param name="adapter"></param>
        /// <returns></returns>
        public static Runtime SetupTinyIoC(this Runtime runtime, Adapter adapter)
        {
            return runtime.SetupContainer(adapter);
        }
    }
}
